package com.zmn.plat.common.util;

import com.zmn.plat.common.dictionary.*;


/**
 * 类描述：
 *
 * @author yangshuangping
 * @since 2021/07/01 14:32
 */
public class ChannelLogUtil {

    public static Object englishToChineseConversion(String fieldName, Object value) {
        switch (fieldName) {
            // 渠道基本信息
            case "rank":
                return ChannelRanKEnum.getName(Integer.parseInt(value.toString()));
            case "channelType":
                return ChannelTypeEnum.getName(Integer.parseInt(value.toString()));
            case "promotionType":
                return ChannelPromotionTypeEnum.getName(Integer.parseInt(value.toString()));
            case "promotionBrand":
                return ChannelPromotionBrandEnum.getName(Integer.parseInt(value.toString()));
            case "level":
                return ChannelLevelEnum.getName(Integer.parseInt(value.toString()));
            case "customerType":
                return ChannelCustomerTypeEnum.getName(Integer.parseInt(value.toString()));
            case "accessIdentity":
                return ChannelAccessIdentityEnum.getIncludeName(value.toString());
            case "status":
                return StatusEnum.getName(Integer.parseInt(value.toString()));
            case "accessMode":
                return ChannelAcessModeEnum.getIncludeName(value.toString());
            case "contractModel":
                return ChannelContractModelEnum.getName(Integer.parseInt(value.toString()));
            case "checkCompanyBank":
                return ChannelCompanyBankEnum.getName(Integer.parseInt(value.toString()));
            case "plat":
                return PlatEnum.getName(Integer.parseInt(value.toString()));
            // 订单配置
            case "outReceivablesLimit":
            case "inReceivablesLimit":
                return ChannelReceivablesLimitEnum.getName(Integer.parseInt(value.toString()));
            case "payer":
                return ChannelPayerEnum.getIncludeName(value.toString());
            case "prepayType":
                return ChannelPayerTypeEnum.getName(Integer.parseInt(value.toString()));
            case "checkSp":
                return ChannelOrderConfigIsOrNoEnum.getName(Integer.parseInt(value.toString()));
            case "workOrderCancelType":
                return ChannelWorkOrderTypeEnum.getIncludeName(value.toString());
            case "applique":
            case "platformType":
            case "showOrderPrice":
            case "hidden":
            case "portalAddOrder":
            case "sendMsg":
            case "orderTransferType":
                return ChannelOrderConfigEnum.getName(Integer.parseInt(value.toString()));
            case "auditType":
                return ChannelAuditTypeEnum.getName(Integer.parseInt(value.toString()));
            case "chargeDepositAmount":
                return ChannelOrderConfigEnum.getName(Integer.parseInt(value.toString()));
            case "channelPortalDisplayOrder":
                return ChannelPortalDisplayOrderEnum.getName(Integer.parseInt(value.toString()));
            case "inviteComment":
                return ChannelSettilIsOrNotEnum.getName(Integer.parseInt(value.toString()));
            case "guideThirdPartPay":
                return ChannelSettilIsOrNotEnum.getName(Integer.parseInt(value.toString()));
            case "showPayQr":
                return ChannelSettilIsOrNotEnum.getName(Integer.parseInt(value.toString()));

            // 结算信息
            case "settleCycle":
                return ChannelStatementModeEnum.getText(Integer.parseInt(value.toString()));
            case "statementGenerateTime":
            case "statementEndTime":
                return value.toString() + "日";
            case "statementNode":
                return ChannelSettleNodeEnum.getName(Integer.parseInt(value.toString()));
            case "statementChannel":
                return ChannelSettleStatementChannelEnum.getName(Integer.parseInt(value.toString()));
            case "mergeSettle":
                return ChannelSettilIsOrNotEnum.getName(Integer.parseInt(value.toString()));
            case "writeInvoiceParty":
                return ChannelSettlePayerEnum.getName(Integer.parseInt(value.toString()));
            case "customerCostMode":
                return ChannelSettleCustomerCostModeEnum.getName(Integer.parseInt(value.toString()));

            default:
                return value;

        }
    }
}
